define(['models/map','/socket.io/socket.io.js'], function (map) {
    "use strict";

    function Opener() {
        this.id;
        this.socket;
        this.connect();
        console.log('models/user/openerlight.js. instantiated.');
    };

    Opener.prototype = {
        constructor: Opener,
        dispose: function () {
        },
        getCurrentPosition: function () {
            console.log('models/user/openerlight.js. getCurrentPosition.');
        },
        start: function () {
            console.log('models/user/openerlight.js. start.');
        },
        stop: function () {
            console.log('models/user/openerlight.js. stop.');
        },
        connect: function () {
            this.socket = io.connect();
            self = this;
            this.socket.on('connect', function () {
                self.id = this.socket.sessionid;
                console.log('models/user/openerlight.js. socket.io connected! (connect id: ' + self.id + ')');
            });
        }
    };

    console.log('models/user/openerlight.js');
    return new Opener();
});